#!/bin/bash
dt=$(date +"%Y-%m-%d")
arr=(AML_ACCOUNT_MASTER AML_ALERT AML_CUSTOMER_MASTER AML_MONITORING_RULE AML_SCREENING_RESULT AML_SUSPICIOUS_TXN_REPORT AML_TRANSACTION_DETAIL AML_UBO_INFO AML_WATCHLIST_DETAIL AML_WATCHLIST_MASTER)
for v in ${arr[@]}
do
sqoop import \
  --connect jdbc:oracle:thin:@192.168.65.49:1521:orcl \
  --username wlz \
  --password 123456 \
  --table $v \
  --hcatalog-database ods \
  --hcatelog-table ODS_$v \
  --hive-partition-key etl_date \
  --hive-partition-value '$dt' \
  -m 1
  done



